<template>
  	<div>
	  	<headerBar @done="searchClick" @gobackdone="gotobtn"></headerBar>
      <!-- 下拉出现功能 -->
      <div class="dropDown_intop" v-if="drownshareShow">
        <div class="dropDownpanel">
            <span class="dropdown_triangle"></span>
            <a href="javascript:void(0)" @click="shareClick"><i class="iconfont icon-fenxiang4" ></i>分享</a>
            <a href="javascript:void(0)" @click="addProduct"><i class="iconfont icon-tianjiachanpin1"></i>添加产品</a>
            <a href="javascript:void(0)" @click="addNews"><i class="iconfont icon-tianjiaxinwen1"></i>添加新闻</a>
        </div>
      </div>
      <div class="content" @click.capture="closeDrown">
        <!--banner-->
        <div class="content_top">
          <div class="banner"> 
            <!-- <img src="../common/images/banner.png" width="100%" /> -->
              <!-- <swiper :options="swiperOption">
                <swiper-slide v-for="(img, index) in imgs" :key="index">
                    <div @click="gotoBannerLink(img.banner_links)">
                      <img :src="path+img.banner_img" alt="">
                    </div>
                </swiper-slide>
              </swiper>
              <div class="swiper-pagination"></div> -->
              <swiper :options="swiperOption">
                  <swiper-slide v-for="(img, index) in imgs" :key="index">
                      <div @click="gotoBannerLink(img.banner_name)">
                        <img :src="img.banner_img" alt="">
                      </div>
                  </swiper-slide>
              </swiper> 
              <div class="swiper-pagination"></div>
          </div>
          <div class="banner_bottom">
            <div class="platform">
              <ul>
                <li v-for="(item, index) in items" :key="index">
                  <i class="iconfont icon-duigou1"></i>
                  <span>{{item.itemName}}</span>
                </li>
              </ul>
            </div>  
            <div class="coterie">
                <ul>
                  <li v-for="(coter, suoyin) in coters" :key="suoyin" @click="ListIndex(suoyin)">
                      <img :src="coter.src" alt="">
                      <span>{{coter.coterText}}</span>
                  </li>
                </ul>
            </div>  
          </div>
        </div>
        <!--圈子-->
        <div class="dividing_circle">
          <!-- <div class="failedLoadEmpty" v-if="hostlistShow">
              <div class="location_indicator">
                  <lazy-image :placeholder="(require('../common/images/svg_loading.svg'))" alt="">
                  </lazy-image>
              </div>
          </div> -->
          <!--行业圈-->
          <div class="industry_circle" v-for="(industry, ind) in cateList" :key="ind" >
            <div class="title_text_more">
              <h3>{{industry.t_name}}</h3>
              <a @click="JumpCircleList(industry.tid)">更多<i class="iconfont icon-xiangyou"></i></a>
            </div>
            
            <div v-if="industry.list == ''" class="failedLoadEmpty">
                <img src="../common/images/Disappointment.png" alt="">
                <span>暂无查询结果</span>
            </div>
            <div class="big_square" v-else>
              <ul class="soc">
                <li v-for="child in industry.list.slice(0, 4)" :key="child" @click="JumpList(child.cid)">
                    <small>
                      <img :src="child.img" v-if="child.img">
                      <img src="../common/images/youquan.png" v-if="industry.tid == 3 && child.img == ''">
                      <span class="img_info_one" style="color: #DD948E;" v-if="industry.tid == 1 || industry.tid == 2">{{child.c_name.substring(0,1)}}</span>
                      <!-- <span class="img_info_one" style="color: #fff;" :style="'background-color:' + child.bgcolor" v-if="industry.tid == 1 || industry.tid == 2">{{child.c_name.substring(0,1)}}</span> -->
                    </small>
                    <span>{{child.c_name}}</span>
                </li>
              </ul>
            </div>
          </div>
          <!-- 热销榜单 -->
          <div class="industry_circle">
            <div class="title_text_more">
              <h3>热销产品<em>每日热销排行</em></h3>
              <router-link to="/ProductList">更多<i class="iconfont icon-xiangyou"></i></router-link>
            </div>
            <!-- <div v-if="hostlistShow" class="failedLoadEmpty">
                <div class="location_indicator">
                  <img src="../common/images/svg_loading.svg" alt="">
                  <span class="first-words">加载中。。。</span>
                </div>
            </div> -->
            <div v-if="hostlist == ''" class="failedLoadEmpty">
                <img src="../common/images/Disappointment.png" alt="">
                <span>暂无查询结果</span>
            </div>
            <div class="host_item" v-else>
              <ul>
                <li v-for="(host, h) in hostlist" :key="h" @click="productDetailClick(host.IDProduct)">
                  <a >
                    <small>
                      <img src="../common/images/cm_03.jpg" v-if="host.smallImg == null">
                      <img :src="host.smallImg" alt="" v-else>
                    </small>
                    <span>{{host.chrName}}</span>
                    <span>已售<strong>{{host.NumS}}</strong>件</span>
                  </a>
                </li>
              </ul>
            </div>
          </div>
          <!-- 限时抢购 -->
          <!-- <div class="industry_circle rush_to_purchase">
            <div class="purchase_title title_text_more">
              <h3><span>限时抢购</span><em>80</em>:<em>21</em>:<em>47</em></h3>
              <router-link to="/ProductList">更多<i class="iconfont icon-xiangyou"></i></router-link>
            </div>
            <div class="purchase">
              <div style="font-size: 0.3rem; color: rgb(102, 102, 102); line-height: 0.5rem;height: 0.5rem;margin: 0.4rem 0;" v-if="purlist == ''">
                  暂无数据  ╮(￣▽￣)╭
              </div>
              <ul class="purchase_list clear">
                <li v-for="(pur, p) in purlist" :key="p" @click="productDetailClick(pur.IDProduct)">
                  <a>
                    <span class="purchase_img">
                      <img src="../common/images/cindex_37.jpg" v-if="pur.smallImg == null">
                      <img :src="path + pur.smallImg" v-else>
                    </span>
                    <span>{{pur.chrName}}</span>
                    <span class="pur_scare">
                      <em>抢购价</em>
                      <strong><sub>￥</sub>{{pur.Price}}</strong>
                      <small>已抢购{{pur.NumS}}件</small>
                    </span>
                  </a>
                </li>
              </ul>
            </div>
          </div> -->
          <!-- 活动列表 -->
          <!-- <div class="industry_circle active_list" style="border-bottom: 0.2rem solid #f5f5f5;">
            <div class="title_text_more">
              <h3>商家活动</h3>
              <router-link to="/activityList">更多<i class="iconfont icon-xiangyou"></i></router-link>
            </div>
            <div v-if="actives == ''" class="failedLoadEmpty">
                <img src="../common/images/Disappointment.png" alt="">
                <span>暂无查询结果</span>
            </div>
            <div class="active_item" v-else>
              <ul>
                <li v-for="(activeitem, act) in actives" :key="act" @click="activitydetailClick(activeitem.id)">
                  <a class="clear">
                    <span class="active_list_img">
                    	<img src="../common/images/cindex_19.jpg" v-if="activeitem.img == null">
								      <img :src="activeitem.img" alt="" v-else>
                    </span>
                    <p class="active_text"><em class="cur">热门</em>{{activeitem.title}}</p>
                    <p class="active_text">开始时间：{{activeitem.begin_time}}</p>
                    <p class="active_text"><span><sub>￥</sub><strong>{{activeitem.price}}</strong>起</span></p>
                    <!-- <span>{{activeitem.apply_num}}</span> -->
                  <!--</a>
                </li>
              </ul>
            </div>
          </div> -->
          <!-- 资讯列表 -->
          <div class="new_info_list" style="border-top: 0.2rem solid #f5f5f5;">
            <div class="title_text_more">
              <h3>企业新闻</h3>
              <router-link to="/newsList">更多<i class="iconfont icon-xiangyou"></i></router-link>
            </div>
            <div v-if="infos == ''" class="failedLoadEmpty">
                <img src="../common/images/Disappointment.png" alt="">
                <span>暂无查询结果</span>
            </div>
            <ul v-else v-for="(initem, t) in infos" :key="t">
              <li @click="newsdetailClick(initem.IDNews)" v-if="initem.count ==1" class="new_info_list_li">
                <a href="javascript:void(0)" class="clear">
                  <div class="new_info_single_img fl">
                    <img src="../common/images/cindex_41.jpg"  v-if="initem.img == null">
                    <img :src="initem.img" alt="" v-else> 
                  </div>
                  <p class="new_info_itemTitle">{{initem.Title}}</p>
                  <p class="new_info_itemdesc clear"><span class="fl">{{initem.summary}}</span><span class="fr">{{initem.dtCreate}}</span></p>
                </a>
              </li>
              <li @click="newsdetailClick(initem.IDNews)" v-else>
                <div class="new_info_item">
                  <p>{{initem.Title}}</p>
                  <ul class="clear">
                    <li class="fl" v-for="(info, fo) in initem.img" :key="fo">
                      <a href="javascript:void(0)">
                        <span class="new_info_img fl">
                          <img src="../common/images/cindex_41.jpg"  v-if="info == null">
                          <img :src="info" alt="" v-else>
                        </span>										
                      </a>
                    </li>
                  </ul>
                  <p class="new_info_desc clear"><span class="fl">{{initem.summary}}</span><span class="fr">{{initem.dtCreate}}</span></p>
                </div> 
              </li>
            </ul>
          </div>
        </div>
      </div>
      <div class="Share_guidance" @click="closeShare"  v-show="shareshow"></div>
      <shareTopage v-show="shareToShow" @wxdone="closeShare" @wxmessage="MessageShareData" @wxline="TimelineShareData"></shareTopage>
      <share v-if="isShow" @success="shareSuccess" @closeShare="closeShare" :title="'友圈首页'" :desc="'快快来分享咯喂'" :link="shareLink" :Sharing="Sharing" :imgUrl="shareLink + IndeximgUrl"></share>
      <!-- <share :title="'友圈首页'" :desc="'快快来分享咯喂'" :link="shareLink" v-if="IsShow"></share> -->
      <!-- <searchPanel v-if="searchShow" @done="comback"></searchPanel> -->

	  	<so-footer></so-footer>
	</div>
</template>

<script>
import headerBar from '../public/header-bar.vue';
import soFooter from '../components/footer-bar';
import share from '../components/WebShare.vue';
import shareTopage from '../components/shareTopage';
import { swiper, swiperSlide } from 'vue-awesome-swiper';
import 'swiper/dist/css/swiper.min.css'

import { MessageBox } from 'mint-ui';
import wx from 'weixin-js-sdk';

  export default {
    name: 'home',
    data() {
      return {
        hostlistShow: false,
        noResults: false,
        IndeximgUrl: require('../common/images/UI-11.png'),
      	headerTitle:'友圈',
        cateList:'',
        tid: '',
        drownshareShow: false,
        shareToShow: false,
        shareLink:'',
        isShow:false,
        Sharing: '',    //分享参数
        shareshow: false,   //微信分享引导
        items: [
          { itemName: '社交电商平台'},
          { itemName: '二十万会员企业单位合作伙伴'}
        ],
        coters: [
            { 
              src: require('../common/images/company1.svg'),
              coterText: '圈子',
            },
            { 
              src: require('../common/images/company2.svg'),
              coterText: '商家',
            },
            { 
              src: require('../common/images/company3.svg'),
              coterText: '热卖',
            },
            { 
              src: require('../common/images/company5.svg'),
              coterText: '好友',
            },
            { 
              src: require('../common/images/company4.svg'),
              coterText: '资讯',
            }
        ],
        hostlist: [],
        purlist:[],
        actives: [],
        infos: [],
        infolist: [],
        itemChildren: '',
        searchShow: false,
        userInfo: '',    //用户信息
        // 无缝轮播
        swiperOption: {
            // loop: true,
            autoplay: {
              disableOnInteraction: false,
              delay: 3000
            },
            pagination: {
              el: ".swiper-pagination",
            }
        },

        //轮播图
        imgs: [],
      } 
    },
    created()
    {
      this.shareLink = this.$path;
    },
    mounted() {
      // 用户信息
      this.userInfo = window.localStorage.getItem('userInfo');
      this.userInfo = JSON.parse(this.userInfo);
      //获取所有圈子信息
      this.tagShow();
      //获取热销 抢购 新闻 活动信息
      this.getIndexList();
      //获取banner广告图
      this.getBannerList();
      // this.hostlistShow = true;

      this.calBgImage = (document.body.clientWidth / document.body.clientHeight) > 1.92
      // 然后监听window的resize事件．在浏览器窗口变化时再设置下背景图高度．
      const that = this
      window.onresize = function temp() {
        that.calBgImage = (document.body.clientWidth / document.body.clientHeight) > 1.92
      }

    },
	  components: {
      headerBar,
      soFooter,
      share:resolve => {require(['../components/WebShare.vue'], resolve)},//懒加载
      shareTopage:resolve => {require(['../components/shareTopage.vue'], resolve)},//懒加载
      swiper,
      swiperSlide
    },
    methods: {
      // 点击三个点提示分享引导
      shareClick() {
          if(typeof Wechat !='undefined'){   //安卓
              console.log('进来安卓了');
              this.shareToShow = true;
          }else{
            console.log('进来浏览器')
            //浏览器
              var ua = navigator.userAgent.toLowerCase();
              //微信浏览器
              var isWeixin = ua.indexOf('micromessenger') != -1;
              // this.shareshow = true;
              //微信浏览器
              this.isShow = true;
              this.shareshow = true;
          }
          this.drownshareShow = false;
      },
      // 点击分享遮罩层关闭
      closeShare() {
          this.isShow = false;
          this.shareToShow = false;
          this.shareshow = false;
      },
      //微信群 / 好友
      MessageShareData() {
          this.shareToShow = false;
          this.Sharing = 1;
          this.isShow = true;
          console.log('分享到好友');
      },
      //微信朋友圈
      TimelineShareData() {
          this.shareToShow = false;
          this.Sharing = 0;
          this.isShow = true;
          console.log('分享到微信朋友圈');
      },
      //下拉分享、收藏
      gotobtn() {
          this.drownshareShow = !this.drownshareShow;  //打开下拉分享、收藏
      },
      // 点击空白，下拉框收起
      closeDrown() {
          this.drownshareShow = false;
      },
       /**
			 * 首页分享
			 */
			shareSuccess: function(){
          this.isShow = false;
			},
      //附近的圈子
      tagShow(){
        var ua = navigator.userAgent.toLowerCase();
  　　  var isWeixin = ua.indexOf('micromessenger') != -1;
  　　  if (isWeixin) {  //微信
          console.log('微信浏览器的');
          this.location();
  　　  }else{          //普通浏览器
          console.log('普通浏览器的');
          this.BaiDumap();
  　　  }
      },
      /**
       * 通过定位拿到当前地址，便于修改
       */
      location: function(){
          // alert('进来了微信');
          var that = this;
          // var url = location.href.split('#')[0];
          var u = navigator.userAgent;
          var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
          var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
          let url='';
          if (isAndroid) {
              url=location.href;
          }
          if (isIOS) {
              url=location.href.split('#')[0];  //hash后面的部分如果带上ios中config会不对
          }
          console.log('检测url',url);
          that.$post(that.$path + '/index.php/api/v2/getJsapiTicket', {url: url}).then((res) => {
              console.log('微信res',res);
              if(res.code == 200){
                  wx.config({
                      debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
                      appId: res.data.appid, // 必填，公众号的唯一标识
                      timestamp: res.data.timestamp, // 必填，生成签名的时间戳
                      nonceStr: res.data.noncestr, // 必填，生成签名的随机串
                      signature: res.data.signature,// 必填，签名
                      jsApiList: ['checkJsApi', 'openLocation', 'getLocation'] // 必填，需要使用的JS接口列表
                  });
                  wx.ready(function(){
                      wx.checkJsApi({
                          jsApiList: ['openLocation', 'getLocation'], // 需要检测的JS接口列表，所有JS接口列表见附录2,
                          success: function(res) {
                              console.log(res)
                              // alert(res);
                              // 以键值对的形式返回，可用的api值true，不可用为false
                              // 如：{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
                          }
                      });
                      // 使用微信获取经纬度，在用百度地图的逆地址解析，解析出经纬度对应的地名
                      wx.getLocation({
                          type: 'wgs84', // 默认为wgs84的gps坐标，如果要返回直接给openLocation用的火星坐标，可传入'gcj02'
                          success: function (res) {
                              var latitude = res.latitude; // 纬度，浮点数，范围为90 ~ -90
                              var longitude = res.longitude; // 经度，浮点数，范围为180 ~ -180。
                              // var pt = {lat: res.latitude, lng: res.longitude}
                              // alert('经度：' + res.longitude);
                              // alert('维度：' + res.latitude);
                              var pt = new BMap.Point(res.longitude, res.latitude)
                              // var pt = new BMap.Point(116.354969, 39.348339)
                              var geoc = new BMap.Geocoder(); 
                              geoc.getLocation(pt, function(rs){
                                  console.log('999',rs)
                                  that.showaddress = rs.addressComponents.district;
                                  that.getAllCircle(that.showaddress);
                              })
                          }
                      });
                      
                  });
                  wx.error(function(res){
                      // config信息验证失败会执行error函数，如签名过期导致验证失败，具体错误信息可以打开config的debug模式查看，也可以在返回的res参数中查看，对于SPA可以在这里更新签名。
                      console.log(res);
                  });
              }
          })
      },
      BaiDumap:function(){   
          console.log('进来了百度地图');
          var that = this;
          var geolocation = new BMap.Geolocation();
          geolocation.getCurrentPosition(function(r){
            // console.log('r',r);
            if(this.getStatus() == BMAP_STATUS_SUCCESS){
                var mk = new BMap.Marker(r.point);
                // console.log('mk',mk);
                // map.addOverlay(mk);
                // map.panTo(r.point);
                // alert('您的位置：'+r.point.lng+','+r.point.lat);
                // alert('您的位置:'+r.address.province + ',' + r.address.city);
                var point = new BMap.Point(r.point.lng,r.point.lat);
                var geoc = new BMap.Geocoder(); 
                geoc.getLocation(point, function(rs){
                    console.log(rs)
                    that.showaddress = rs.addressComponents.district;
                    that.getAllCircle(that.showaddress);
                    // that.CardDetails.CardCompanyAddress = rs.address;
                })
            }
            else {
                // alert('failed'+this.getStatus());
            }        
        },{enableHighAccuracy: true})
      },
      //轮播图
      getBannerList () {
        let that = this;
   			this.$fetch(that.$path+'/index.php/api/getBannerList')
          	.then((res) => {
          		 console.log('image',res);
            if(res.code == 200){
              that.imgs = res.data;
            }    
          });
       
          // this.gotoLink(img);
      },
      //通用链接跳转
      gotoBannerLink(banner_name) {
        // console.log('vallllll',val);
        let access_token = window.localStorage.getItem('access_token');
        let timer = window.localStorage.getItem('timer');
        if(!access_token || !timer) {
          if(banner_name == '第一张' || banner_name == '第二张') {
            this.$router.push({path: '/login'}); 
          }
        }else {
          if(banner_name == '第一张'){
            // 即是第二张
            this.$router.push({
                path: '/home/CircleCompanyList',
                query: { paicheNo: 0 }
              });
          }else if(banner_name == '第二张') {
            // 即是第一张
            this.$router.push({
              path: '/home/CircleList',
              query: { paicheNo: 0 }
            });
          }
        }
      },
      // gotoBannerLink (obj) {
      //     let host = this.MAIN_HOST;
      //     if(obj.link){
      //         this.$router.push({
      //             path: obj.link
      //         });
      //     }else if(obj.href) {
      //         window.location.href = host+obj.href+'?cid='+cid+'&uuid='+uuid;
      //     }
      // },
      // 右边下拉
      // godrown() {
      //   this.dropintopShow = !this.dropintopShow;
      // },
      // // 点击空白，下拉框收起
      // closeDrown() {
      //   this.dropintopShow = false;
      // },
      // // 分享引导
      // openShare() {
      //     this.shareShow = !this.shareShow;
      //     this.dropintopShow = false;
      //     this.isShow = true;
      // },
      // 添加产品
      addProduct() {
        let access_token = window.localStorage.getItem('access_token');
        let timer = window.localStorage.getItem('timer');
        if(!access_token || !timer) {
          this.$router.push({path: '/login'}); 
        }else {
           this.$post(
            this.$path + '/api.php/company/getAuthCompanyList', {
              userId: this.userInfo.uid,
              type:1
            })
          .then((res) => {
            if (res.code == '-1') {
              MessageBox.alert('企业管理员才能添加产品哦').then(action => {
                this.$router.push({
                  path: '/companyCreate'
                });
              });
            } else {
              this.$router.push({path: '/userCenter/productInsert',query: {cpId: 0}});
            }

        })
          // // this.$router.push({path: '/userCenter/productManage'}); 
          // MessageBox.alert('您需要先绑定企业').then(action => {
          //     this.$router.push({
          //         path: '/companyCreate'
          //     });
          // });
        }
      },
      // 添加新闻
      addNews() {
        let access_token = window.localStorage.getItem('access_token');
        let timer = window.localStorage.getItem('timer');
        if(!access_token || !timer) {
          this.$router.push({path: '/login'}); 
        }else{

          this.$post(
            this.$path + '/api.php/company/getAuthCompanyList', {
              userId: this.userInfo.uid,
              type:1
            })
          .then((res) => {
            if (res.code == '-1') {
              MessageBox.alert('企业管理员才能添加新闻哦').then(action => {
                this.$router.push({
                  path: '/companyCreate'
                });
              });
            } else {
              this.$router.push({path: '/userCenter/newsInsert',query: {cpId: 0}});
            }

          });
        }
      },
      // 历史记录
      searchClick() {
        this.$router.push({path: '/indexSearchresult'}); 
        // this.historyComponents = true;
      },
      //获取所有的圈子
   		getAllCircle:function(cityName){
         let that = this;
          // that.hostlistShow = true;    //加载中。。。
          // that.$openLoading();
          // return;
          setTimeout(() => {
            that.$fetch(that.$path+'/api.php/Circle/getAllCircleList',{cityName: cityName})
              .then((res) => {
              
              if(res.code == 200){
                that.cateList = res.data;
                res.data.forEach(element => {
                  that.tid = element.t_status;
                  console.log('111',that.tid)
                });
                // that.$closeLoading();
                // that.hostlistShow = false;   //加载完成
              }
              else {
                // that.$closeLoading();
                // that.noResults = true;    //数据为空
              }    
          })
        },3000)    
        // that.closeLoading();
        //  that.noResults = true;
   		},
   		//点击圈子
   		JumpList:function(event){
	      	console.log(event);
	      	this.$router.push({path: '/userCenter/circleindex', query: {paicheNo: event}}); 
      	},
      //点击更多
   		JumpCircleList:function(event){
	      	this.$router.push({path: '/home/CircleList', query: {paicheNo: event}}); 
      },
      //点击产品详情
      productDetailClick(val) {
        this.$router.push({path: '/productDetail', query: {id: val}});
      },
      //点击新闻详情
      newsdetailClick(val) {
        this.$router.push({ path: '/newsDetail', query: {id: val}});
      },
      //点击活动详情
      activitydetailClick(val) {
        this.$router.push({ path: '/activityDetail', query: {id: val}});
      },
      //首页顶部5个产品分类图标
      ListIndex(suoyin) {
        if(suoyin == 0) {
          this.$router.push({path: '/home/CircleList', query: {paicheNo: 0}});
        }else if(suoyin == 1) {
          this.$router.push({path: '/home/CircleCompanyList', query: {paicheNo: 0}});
        }else if(suoyin == 2) {
          this.$router.push({path: '/ProductList'});
        }else if(suoyin == 3) {
          this.$router.push({path: '/information', query: {targetFlag:'friendnews'}});
          // this.$router.push({path: '/activityList'});
        }else if(suoyin == 4) {
          this.$router.push({path: '/newsList'});
        }
      },
      //获取首页显示的热销 抢购产品  新闻 活动
      getIndexList(){
        let that = this;
        //  that.hostlistShow = true;
        this.$fetch(that.$path+'/index.php/getIndexList')
          	.then((res) => {
              console.log('首页',res);
            if(res.code == 200){
              that.hostlist = res.data.h_list;
              that.purlist = res.data.p_list;
              that.actives = res.data.a_list;
              that.infos = res.data.n_list;

              // that.hostlistShow = false;
            }
            else {
              // 加载完成，数据为空
              // that.noResults = true;
            }    
        });
      },
      demo(){
        let depart = [];
        depart['id'] = 1;
        depart['name'] = 'name';
        depart['sort'] = 1;
        console.log(depart);
        this.$post(this.$path+'/index.php/api/company/editDepart',{depart})
          	.then((res) => {
              // console.log('首页demo',res);
        });
      },
      
    }
  }

</script>
<style>
@import '../common/css/index.css';
@import '../common/icon/font/iconfont.css';

.content_top .banner {
  height: 3.2rem;
  position: relative;
}
.banner img {
  width: 100%;
  height: 3.2rem;
}
.swiper-pagination {
  bottom: 0 !important;
  position: absolute;
  left: 0;
  right: 0;
}

/* .swiper-slide {
  -webkit-flex-shrink: 0;
  flex: 0 0 auto;
  flex-shrink: 0;
  position: relative;
} */

.swiper-pagination-bullet {
  margin: 0 0.16rem;
  background-color: #e50838 !important;
}


/* 分享引导 */
.Share_guidance {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url('../common/images/share.png') no-repeat;
    background-size: cover;
    z-index: 100;
    opacity: 0.8;
}

.index-circle-list{
	width:95%; 
}
.index-circle-list li{
	float:left;
	width:22%;
	margin-left:3%;
}
.index-circle-list li div{
	background:#f4f5f7;
	padding:3%;
}
.index-circle-list li img{
	width:95%;
}


/***中间内容顶部****/
.content .content_top {
  /* border-bottom: 0.2rem solid #f5f5f5; */
}

/***中间内容顶部banner图****/

.content_top .banner_bottom .platform ul{
  height: 0.66rem;
  display: flex;
  justify-content: space-around;
  border-bottom: 1px solid #F4F5F7;
}
.platform ul li {
  font-size: .24rem;
  color: #333;
  line-height: 0.66rem;
}
.platform ul li .icon-duigou1 {
  font-size: 0.32rem;
  color: #e50838;
  font-weight: bold;
  vertical-align: middle;
  border: 1px solid #e50838;
  border-radius: 50%;
}

/***中间内容顶部划分圈子****/
.content .dividing_circle {
  padding: 0 0.2rem;
  /* border-top: 0.2rem solid #f5f5f5; */
}

/***行业圈****/


/***热销榜单****/
.industry_circle {
    border-top: 0.2rem solid #f5f5f5;
    margin: 0 -0.2rem;
    /* padding: 0 0.2rem.3rem 0.2rem; */
}
.host_item small {
  width: 2.24rem;
  height: 2.24rem;
  text-align: center;
  vertical-align: middle;
  display: block;
  margin-bottom: 0.1rem;
}
.host_item small img {
  width: 2.2rem;
  height: 2.2rem;
  max-width: 100%;
  max-height: 100%;
}

/***限时抢购****/
.rush_to_purchase {
    padding-bottom: 0;
} 
.purchase_list .purchase_img {
  width: 3.45rem;
  height: 3.45rem;
}
.purchase_list .purchase_img img {
  width: 100% !important;
  height: 3.45rem;
}
.purchase_title span {
  margin-right: 0.2rem;
}
.purchase_title em {
  font-style: normal;
  font-size: 0.2rem;
  color: #fff !important;
  background-color: #E50834;
  padding: 0.06rem;
  margin-left: 0;
  vertical-align: bottom;
}

/***活动列表****/
.active_list {
  /* border-top: 0.2rem solid #f5f5f5;
  margin: 0 -0.2rem; */
  padding-bottom: 0;
}
/* .active_list .active_title {
  padding: 0 .2rem;
} */

/***资讯列表****/
.more_info {
  /* border-top: 0.2rem solid #f5f5f5;
  margin: 0 -0.2rem; */
}

/* 新闻 */
/* 多图 */
.new_info_list {
  /* border-top: 0.2rem solid #f5f5f5; */
  margin: 0 -0.2rem;
}
.new_info_list .new_info_item {
  padding: 0 0.2rem;
  border-bottom: 1px solid #d8d8d8;
}
.new_info_list .new_info_item p {
  font-size: 0.28rem;
  color: #333;
  text-align: left;
  line-height: 0.46rem;
}
.new_info_list .new_info_item .new_info_img {
  width: 2.24rem;
  height: 1.46rem;
  margin-right: 0.19rem;
}
.new_info_list .new_info_item li:last-child .new_info_img {
  margin-right: 0;
}
.new_info_list .new_info_item .new_info_img img {
  width: 100%;
  height: 1.46rem;
}
.new_info_list .new_info_item .new_info_desc {
  line-height: 0.36rem;
  font-size: 0.22rem;
  color: #999;
  line-height: 0.46rem;
}

/* 单个图 */
.new_info_list .new_info_list_li {
  border-bottom: 1px solid #d8d8d8;
  padding: 0.2rem;
  position: relative;
}
.new_info_list .new_info_list_li .new_info_single_img {
  width: 1.2rem;
  height: 1.2rem;
  margin-right: 0.2rem;
  text-align: center;
  vertical-align: middle;
}
.new_info_list .new_info_list_li .new_info_single_img img {
  width: 1.2rem;
  height: 1.2rem;
  max-width: 100%;
  max-height: 100%;
}
.new_info_list .new_info_list_li .new_info_itemTitle {
  font-size: 0.28rem;
  color: #333;
  text-align: left;
  text-overflow: ellipsis;
  -o-text-overflow: ellipsis;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 0.36rem;
}
.new_info_list .new_info_list_li .new_info_itemdesc {
  font-size: 0.22rem;
  color: #999;
  text-align: left;
  position: absolute;
  right: 0.2rem;
  bottom: 0.2rem;
  width: 76%;
  line-height: 0.3rem;
}
/* 新闻右边详情 */
.new_info_list .new_info_list_li .new_info_itemdesc span:first-child {
    width: 2rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    overflow: hidden;
}



/* 下拉框 */
.dropDown_intop {
  /* width: 100%;
  height: 100%;;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 12; */
}
.drop_intop_panel {
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 16;
}
.dropDownpanel {
    width: auto;
    height: auto;
    background-color: #fff;
    position: absolute;
    top: 0.88rem;
    right: 0.12rem;
    z-index: 15;
    border-radius: 4px;
    box-shadow: 2px 2px 5px rgba(211, 125, 125, 0.34);
}
.dropDownpanel .dropdown_triangle {
    width: 0;
    height: 0;
    border-right: 8px solid transparent;
    border-left: 8px solid transparent;
    border-bottom: 8px solid #fff;
    position: absolute;
    right: 0.13rem;
    top: -0.14rem;
    z-index: 15;
}
.dropDownpanel a {
    font-size: 0.3rem;
    color: #333;
    display: block;
    line-height: 0.92rem;
    height: 0.92rem;
		text-align: left;
		padding: 0 0.2rem;
}
.dropDownpanel a .icon-icon,
.dropDownpanel a .icon-tianjiachanpin1,
.dropDownpanel a .icon-fenxiang4,
.dropDownpanel a .icon-tianjiaxinwen1 {
  font-size: 0.36rem;
	margin-right: 0.2rem;
	color: #333;
}

/* 协会圈 */
.soc .img_info_one {
    width: 1.1rem;
    height: 1.1rem;
    font-size: 0.3rem;
    background: url('../common/images/UI-04.png') no-repeat center;
    background-size: cover;
    line-height: 1.1rem;
    text-align: center;
}


@media screen and (min-width:768px) {
  .coterie ul li img {
    width: 0.82rem;
  }
}


</style>
